<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<!DOCTYPE html>
<html lang="en">
<body>
<div th:fragment="onLoadJs">


    <!-- jQuery -->
    <script type="text/javascript" th:src="@{/js/jquery-2.1.1.js}"></script>
    <script type="text/javascript" th:src="@{/js/bootstrap.min.js}"></script>

    <!-- Custom Theme JavaScript -->
    <script th:src="@{/js/agency.js}"></script>

    <!-- Plugin JavaScript -->
    <script th:src="@{/js/jquery.easing.min.js}"></script>
    <script th:src="@{/js/classie.js}"></script>
    <script th:src="@{/js/cbpAnimatedHeader.js}"></script>
    <script th:src="@{/page/page.js}"></script>

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">
    <script src="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>
    <script type="text/javascript">

        function search() {
            var word = $('#word').val();
            window.location.href = getRootPath_dc() + "search?word=" + word;
        }

        $(document).keyup(function (event) {
            if (event.keyCode == 13) {
                search();
            }
        });

        $("#word").keydown(function (event) {
            if (event.keyCode == 13) {
                search();
            }
        });


        var gitalk = new Gitalk({
            clientID: '1abc318156834d665790',
            clientSecret: 'c6acdff3af145a7f769cd5684ec715e2dd421268',
            repo: 'dalaoyang-message',
            owner: 'dalaoyang',
            admin: ['dalaoyang'],
            //	id: location.pathname,      // Ensure uniqueness and length less than 50
            distractionFreeMode: false  // Facebook-like distraction free mode
        })

        gitalk.render('gitalk-container')
    </script>
    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?96a910442b69d3b86cd4791865bb9bbe";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();

        var backButton = $('.back_to_top');

        function backToTop() {
            $('html,body').animate({
                scrollTop: 0
            }, 800);
        }

        backButton.on('click', backToTop);
        $(window).on('scroll', function () {/*当滚动条的垂直位置大于浏览器所能看到的页面的那部分的高度时，回到顶部按钮就显示 */
            if ($(window).scrollTop() > 800)
                backButton.fadeIn();
            else
                backButton.fadeOut();
        });
        $(window).trigger('scroll');
        /*触发滚动事件，避免刷新的时候显示回到顶部按钮*/
    </script>
    <!-- BEGIN JIVOSITE CODE {literal} -->
    <!--<script type='text/javascript'>-->
        <!--(function () {-->
            <!--var widget_id = '5LZSoP8ABc';-->
            <!--var d = document;-->
            <!--var w = window;-->

            <!--function l() {-->
                <!--var s = document.createElement('script');-->
                <!--s.type = 'text/javascript';-->
                <!--s.async = true;-->
                <!--s.src = '//code.jivosite.com/script/widget/' + widget_id;-->
                <!--var ss = document.getElementsByTagName('script')[0];-->
                <!--ss.parentNode.insertBefore(s, ss);-->
            <!--}-->

            <!--if (d.readyState == 'complete') {-->
                <!--l();-->
            <!--} else {-->
                <!--if (w.attachEvent) {-->
                    <!--w.attachEvent('onload', l);-->
                <!--} else {-->
                    <!--w.addEventListener('load', l, false);-->
                <!--}-->
            <!--}-->
        <!--})();</script>-->
    <!-- {/literal} END JIVOSITE CODE -->
</div>
</body>
</html>